﻿using SAD_Assignment1.DAO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SAD_Assignment1.BLO
{
    public class LikeBLO
    {
        public int countLikePhoto(int photoID)
        {
            LikeDAO likeDAO = new LikeDAO();
            return likeDAO.countLikePhoto(photoID,true);
        }

        public int countUnlikePhoto(int photoID)
        {
            LikeDAO likeDAO = new LikeDAO();
            return likeDAO.countLikePhoto(photoID, false);
        }

        public bool LikePhoto(int photoID, int accID)
        {
            LikeDAO likeDAO = new LikeDAO();
            return likeDAO.LikePhoto(photoID, accID, true);
        }

        public bool UnlikePhoto(int photoID, int accID)
        {
            LikeDAO likeDAO = new LikeDAO();
            return likeDAO.LikePhoto(photoID, accID, false);
        }

        public bool IsLikePhoto(int photoID, int accID)
        {
            LikeDAO likeDAO = new LikeDAO();
            return likeDAO.IsLikePhoto(photoID, accID,true);
        }

        public bool IsUnlikePhoto(int photoID, int accID)
        {
            LikeDAO likeDAO = new LikeDAO();
            return likeDAO.IsLikePhoto(photoID, accID, false);
        }
    }
}